﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddNewType.aspx.cs" Inherits="sysadmin_NewManager_AddNewType" %>

<%@ Register TagPrefix="radU" Namespace="Telerik.WebControls" Assembly="RadUpload.Net2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>创建新闻类别</title>
    <link href="../../css/1/css/css.css" type="text/css" rel="stylesheet" />
    
    <script type="text/javascript" language="javascript">
    function openUploadFile(CourseID)
    {
      var StrCourseName=document.form1.txt_CourseName.value;
      window.location="uploadFile.aspx?StrCourseName="+StrCourseName+"&CourseID=0" ;
    }
    </script>
    <script type="text/javascript" language="javascript">
        function ShowNo()                        //隐藏两个层
        {
            document.getElementById("doing").style.display="none";
            document.getElementById("divLogin").style.display="none";
        }
        function $(id)         
        {
            return (document.getElementById) ? document.getElementById(id) : document.all[id] ;
        }
        function showFloat()                    //根据屏幕的大小显示两个层
        {
            var range = getRange();
            $('doing').style.width = range.width + "px";
            $('doing').style.height = range.height + "px";
            $('doing').style.display = "block";
            document.getElementById("divLogin").style.display="";
        }
        function getRange()                      //得到屏幕的大小
        {
              var top     = document.body.scrollTop;
              var left    = document.body.scrollLeft;
              var height  = document.body.clientHeight;
              var width   = document.body.clientWidth;

              if (top==0 && left==0 && height==0 && width==0) 
              {
                top     = document.documentElement.scrollTop;
                left    = document.documentElement.scrollLeft;
                height  = document.documentElement.clientHeight;
                width   = document.documentElement.clientWidth;
              }
              return  {top:top  ,left:left ,height:height ,width:width } ;
        } 
        function AutoColseAler()
        {
            //showFloat();
            //setTimeout("ShowNo()",3000);
        }

    </script>
</head>
<body class="bodymain">
    <form id="form1" runat="server">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tree-titbg_right">
        <tr>
            <td class="tree-titbg_left">
                <asp:Label ID="lbl_InfoTitle_AddNewType" runat="server" Text=""></asp:Label>
            </td>
        </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" class="tableList2" width="100%">
        <tr>
            <th>
                <asp:Label ID="lbl_NewTypeName" runat="server" Text=""></asp:Label>&nbsp;
            </th>
            <td>
                <asp:TextBox ID="txtNewTypeName" runat="server" MaxLength="100" Width="256px"></asp:TextBox>&nbsp;
                <asp:RequiredFieldValidator ID="rfv_NewTypeName" runat="server" ErrorMessage="*"
                    ControlToValidate="txtNewTypeName"></asp:RequiredFieldValidator>
            </td>
            <td>
            </td>
        </tr>
        <tr>
                <th>
                    上传图片</th>
                <td colspan="2">
                    <asp:TextBox ID="txt_pic" runat="server" Width="360px"></asp:TextBox>
                    <a href="#" onclick="showFloat();">上传图片...</a>
                    <asp:Label ID="lbl_UploadFile" runat="server" Text=""></asp:Label></td>
            </tr>
        <tr>
            <th>
                是否为头标题
            </th>
            <td>
                <asp:RadioButton ID="rdbtn_topno" runat="server" Text="否" GroupName="istop"  />
                <asp:RadioButton ID="rdbtn_topyes" runat="server" Text="是" GroupName="istop"  />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <th>
                是否显示
            </th>
            <td>
                <asp:RadioButton ID="rdbtn_showpno" runat="server" Text="否" GroupName="isshow" />
                <asp:RadioButton ID="rdbtn_showpyes" runat="server" Text="是" GroupName="isshow" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <th>
                使用新闻模板
            </th>
            <td>
                <asp:RadioButton ID="rdbtn_No" runat="server" Text="否" GroupName="timeg" AutoPostBack="True"
                    Checked="True" OnCheckedChanged="rdbtn_No_CheckedChanged" />
                <asp:RadioButton ID="rdbtn_Yes" runat="server" Text="是" GroupName="timeg" AutoPostBack="True"
                    OnCheckedChanged="rdbtn_Yes_CheckedChanged" />
            </td>
            <td>
            </td>
        </tr>
        <tr id="tr_NewTemplet" runat="server" visible="false">
            <th>
                &nbsp;
            </th>
            <td>
                <asp:Label ID="lbl_NewTempletNewID" runat="server" Text='0' Visible="False"></asp:Label>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="mainList">
                    <asp:Repeater ID="rptNewTemplet" runat="server" OnItemCommand="rptNewTemplet_ItemCommand"
                        OnItemDataBound="rpt_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                <%--<td  style="width:20px">
                        
                    </td>--%>
                                <td>
                                    <asp:Label ID="lbl_TempletID" runat="server" Text='<%#Eval("ID")%>' Visible="False"></asp:Label>
                                    <%#Eval("Name")%><asp:Label ID="lbl_IsSel" runat="server" Text=''></asp:Label>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lnkbtn_editor" runat="server" CommandName="leditor" CommandArgument='<%#Eval("ID")%>'>选择</asp:LinkButton>|
                                    <asp:LinkButton ID="lnkbtn_Islook" runat="server" CommandName="islook" CommandArgument='<%#Eval("Url")%>'>预览</asp:LinkButton>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <tr>
                        <%--<td  style="width:20px">
                        
                    </td>--%>
                       <%-- <td colspan="2">
                            <font color="red">删除此类新闻以前生成页面</font><asp:RadioButton ID="rbt_del_no" runat="server" Text="否" GroupName="rbt_del_ne"
                                Checked="True" />
                            <asp:RadioButton ID="rbt_del_yes" runat="server" Text="是" GroupName="rbt_del_ne" />
                        </td>--%>
                    </tr>
                </table>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td colspan="3" class="tree-bottom-bg">
                <asp:Button ID="btnSave" runat="server" Text="" CssClass="inputBotton2" OnClick="btnSave_Click" />&nbsp;&nbsp;
                <asp:Button ID="btnReset" runat="server" Text="" CssClass="inputBotton2" OnClick="btnReset_Click"
                    CausesValidation="False" />
            </td>
        </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td colspan="3">
                &nbsp;&nbsp;<asp:Label ID="lbl_msg_Error" runat="server" Text="" ForeColor="red"></asp:Label>
            </td>
        </tr>
    </table>
    
    <div id="doing" style="filter: alpha(opacity=30); -moz-opacity: 0.3; opacity: 0.3;
            background-color: #000; width: 100%; height: 100%; z-index: 1000; position: absolute;
            left: 0; top: 0; display: none; overflow: hidden;">
        </div>
    <div id="divLogin" style="border: solid 10px #898989; background: #fff; padding: 10px;
            width: 780px; z-index: 1001; position: absolute; display: none; top: 31%; left: 49%;
            margin: -200px 0 0 -400px;">
            <div style="padding: 3px 15px 3px 15px; text-align: left; vertical-align: middle;">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableList2">
                    <tr>
                        <th>
                            &nbsp;</th>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lbl_msg_description" runat="server" Text=""></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <radu:radprogressmanager id="Radprogressmanager1" width="100%" runat="server" />
                            <radu:radprogressarea id="progressArea1" width="100%" runat="server">
                    </radu:radprogressarea>
                            <br />
                            <asp:FileUpload ID="FileUpload1" runat="server" Width="80%" />
                            <asp:Button ID="btn_Back" runat="server" CssClass="inputBotton2" Text="上传" OnClick="btnUpload_Click" />
                            <br />
                            <asp:Label ID="lbl_FileUpload_msg_FileType" runat="server" Text="" ForeColor="Red"></asp:Label></td>
                    </tr>
                    <tr>
                        <td class="tree-bottom-bg1">
                            <input id="btn_colse" type="button" value="关闭" class="inputBotton2" onclick="ShowNo()" /> </td>
                    </tr>
                </table>
            </div>
            </div>
    </form>
</body>
</html>
